package com.ruoyi.utils;

import java.util.List;

/**
 * @Author: 程昱轩
 * @Description: TODO
 * @DateTime: @date 2022/11/13 14:34
 **/

public class PageResult {
    private Integer pagenum;
    private Integer pagesize;
    private Integer pages;
    private Integer total;
    private Integer pre;
    private Integer next;
    private List data;

    public PageResult() {
    }

    public PageResult(Integer pagenum, Integer pagesize, Integer pages, Integer total, List data) {
        this.pagenum = pagenum;
        this.pagesize = pagesize;
        this.pages = pages;
        this.total = total;
        this.pre = 1;
        if (pagenum>1){
            this.pre=pagenum-1;
        }

        this.next = pagenum+1;
        if (pagenum==pages){
            this.next=pages;
        }

        this.data = data;

    }

    public Integer getPagenum() {
        return pagenum;
    }

    public void setPagenum(Integer pagenum) {
        this.pagenum = pagenum;
    }

    public Integer getPagesize() {
        return pagesize;
    }

    public void setPagesize(Integer pagesize) {
        this.pagesize = pagesize;
    }

    public Integer getPages() {
        return pages;
    }

    public void setPages(Integer pages) {
        this.pages = pages;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Integer getPre() {
        return pre;
    }

    public void setPre(Integer pre) {
        this.pre = pre;
    }

    public Integer getNext() {
        return next;
    }

    public void setNext(Integer next) {
        this.next = next;
    }

    public List getData() {
        return data;
    }

    public void setData(List data) {
        this.data = data;
    }






}
